package com.jzo2o.health.enums;

import com.jzo2o.statemachine.core.StatusChangeEvent;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * TODO
 *
 * @Author whx
 * @Date 2024/12/17 19:56
 */
@Getter
@AllArgsConstructor
public enum OrderPayStatusChangeEnum implements StatusChangeEvent {

    PAYED(OrderPayStatusEnum.NO_PAY, OrderPayStatusEnum.PAY_SUCCESS, "用户支付", "PAYED"),
    VERIFICATION(OrderPayStatusEnum.PAY_SUCCESS, OrderPayStatusEnum.PAY_SUCCESS, "到院核销", "VERIFICATION"),
    CANCEL(OrderPayStatusEnum.NO_PAY, OrderPayStatusEnum.NO_PAY, "用户取消订单", "CANCEL"),
    ORDER_OUT_OF_TIME(OrderPayStatusEnum.NO_PAY, OrderPayStatusEnum.NO_PAY, "超时取消", "ORDER_OUT_OF_TIME"),
    REFUNDING(OrderPayStatusEnum.PAY_SUCCESS, OrderPayStatusEnum.REFUNDING, "发起退款", "REFUNDING"),
    REFUND_SUCCESS(OrderPayStatusEnum.PAY_SUCCESS, OrderPayStatusEnum.REFUNDING, "发起退款", "REFUND_SUCCESS"),
    REFUND_FAILED(OrderPayStatusEnum.PAY_SUCCESS, OrderPayStatusEnum.REFUNDING, "发起退款", "REFUND_FAILED");

    private final OrderPayStatusEnum sourceStatus;

    private final OrderPayStatusEnum targetStatus;

    private final String desc;

    private final String code;

}
